<template>
	<view v-if="helpList.length>0" class="xinwen-body">
		<!-- 客服帮助 -->
		<view class="zixun-item" v-for="(helpItem, helpIndex) in helpList" :index="helpIndex" :key="helpIndex" @click="goArticleDetails"
		 :data-index="helpItem">
			<image v-if="helpItem.icon_image" :src="helpItem.icon_image" class="zixun-item-image" mode="scaleToFill" />
		</view>
	</view>
</template>

<script>
	import request from '../index/request.js';
	export default {
		data() {
			return {
				helpList: [],
			}
		},
		methods: {
			onShow: function() {
				this.share.title = "帮助"
				this.share.url = '/pages/help/index?appInviteId=' + this.appUtil.getAppInviteId()
				this.share.shareType = 0
			},
			onLoad: function(options) {
				this.appUtil.saveAppInviteId(options)
				//帮助
				this.GetHelpInFo()
			},
			GetHelpInFo: function() {
				var that = this
				request.post("api/common/H5_page", {
					lave: "4"
				}).then(data => {
					that.helpList = data.datas
				})
			},
			goArticleDetails: function(e) {
				var item = e.currentTarget.dataset.index
				uni.navigateTo({
					url: '/pages/article-details/index?load_url=' + encodeURIComponent(item.url) + "&title=" + item.name
				})
			},
		}
	}
</script>

<style>
	@import "index.css";
</style>
